window.config = {
	host: 'http://' + window.location.host
}

axios.interceptors.request.use(function(request) {
         // 添加时间戳，禁止缓存请求
         if (request.params) {
             request.params.t = new Date().getTime()
         } else {
             request.params = {
                 t: new Date().getTime()
             }
         }
         return request;
     }),
     function(error) {
         return Promise.reject(error)
     }

 axios.interceptors.response.use(function(response) {
     return response;
 }, function(error) {
     /*请求错误时做些事*/
     switch (error.response.status) {
         case 401:
             window.location.href = '/'
             return;
         default:
             break;
     }
     return error.response
 })